namespace OOP
{
    public abstract class Animal {

       public Animal(){

       }
       /// <summary>
       /// Function Overloading
       /// 静态多态 函数重载
       /// </summary>
       /// <param name="name"></param>
       public Animal(string name)
       {
            Name = name;
       }

       /// <summary>
       /// virtual function
       /// 动态多态
       /// </summary>
       /// <returns></returns>
       public abstract string Talk();

       public string Name {get; set;}
    }

    public class Cat: Animal {
        public override string Talk() {
            return "Meow!";
        }
    }

    public class Dog : Animal {
        public override string Talk() {
            return "Woof!";
        }
    }

}